import { it } from "node:test";

function add(a: number, b: number): number {
    return a + b;
}


let myAdd: (a: number, b: number) => number = function (a, b) {
    return a + b;
}
//通过?表示该参数为可选参数
// const fn = (name: string, age?: number | undefined): string => {
//     return name + age
// }
// fn('张三')

const fn = (array: number[], ...items: any[]): any[] => {
    console.log(array, items);
    return items;

}
